#ifndef GAME_H
#define GAME_H

#include "Singleton.h"

#include <QDebug>
#include <QList>

enum REQUEST_TYPE
{
  None, Help, Print
};

class Document
{
public:
    Document(QString name){}
    virtual ~Document(){}
    virtual void Open(){ qInfo()<<"Document"<<__FUNCTION__; }
    virtual void Close(){ qInfo()<<__FUNCTION__; }
};

class Commond
{
public:
    virtual ~Commond(){}
    virtual void Execute(){
        qInfo()<<__FUNCTION__;
    }
protected:
    Commond(){}
};

class TApplication {
  public:
    virtual ~TApplication(){}
    virtual void add(Document*){}
};


class OpenCommond: public Commond
{
public:
    OpenCommond(TApplication* a){
        _app = a;
    }
    virtual ~OpenCommond(){}
    virtual void Execute(){
        qInfo()<<"OpenCommond"<<__FUNCTION__;
        Document* d = new Document(_name);
        _app->add(d);
        d->Open();
    }
private:
    TApplication* _app;
    QString _name;
};



#endif // GAME_H
